1. Field of the Invention
The present invention relates to a digital data processor and, more particularly, to a processor including a barrel shifter for shifting a digital signal having a plurality of bit data by an arbitrary number of bits with one shifting operation.
2. Description of the Related Art
In order to perform a rapid shift of an input data by a predetermined number of bits, a digital data processor such as a microcomputer includes a barrel shifter. The barrel shifter includes a plurality of MOS transistors arranged in a matrix form, a plurality of input signal lines for transmitting each bit of information of the input data, a plurality of output signal lines for transmitting each bit of information of the shifted output data and a plurality of shift control lines each connecting to gates of the MOS transistors arranged diagonally in the matrix. The source-drain path of each MOS transistor is connected between one of the input signal lines and one of the output signal lines. The shift data representive of a shifting amount or number is supplied selectively to the gates of MOS transistors through the shift control lines.
If any one of the input and output signal lines has an open-defect, if it has a short-defect connected to another or if any one of the MOS transistors has a structural defect, the barrel shifter does not execute a correct data-shift operation. Therefore, it is required to test whether or not the barrel shifter can operate normally.
However, the data processor in the prior art does not have a particular test circuit for the barrel shifter, and, therefore, the operation for judging whether or not the shifted data is correct must be carried out with the aid of an external test circuit. A reading operation of the shifted-data and an external judging operation are thereby required, so the test cannot be completed within a short period. A digital processor having a comparing function can compare, by using this function, the output data from the barrel shifter with true or reference data to perform the judging operation, but in this case, time and labor for writing the true data into the processor are required, because the true or reference data must be externally generating by shifting the input data.
Moreover, even if the barrel shifter passes the test, it may produce incorrectly shifted data due to a noise or surge voltage applied thereto in the actual operation state of the processor. However, the processor cannot detect the incorrect shifting-operation, so that the incorrectly shifted data will be utilized as true data in the signal processing operation.